package cn.myjerry.prototype;

import java.util.Date;

/**
 * 测试原型模式(深克隆)
 * @author Jerry
 *
 */
public class Client2 {
	public static void main(String[] args) throws Exception {
		Date date = new Date(8973482795L);
		Sheep2 Sheep2 = new Sheep2("少丽", date);
		Sheep2 Sheep21 = (Sheep2) Sheep2.clone();
		System.out.println(Sheep2.getName());
		System.out.println(Sheep2.getBirthday());
		
		date.setTime(200898980958L);
		System.out.println(Sheep2.getBirthday());
		
		System.out.println(Sheep21.getName());
		System.out.println(Sheep21.getBirthday());
	}
}
